import Vue from "vue";

import VueRouter from 'vue-router'

// 引入路由
import Home from '../pages/Home'
import Login from '../pages/Login'

//引入二级路由
import News from '../pages/Home/News'
import Music from '../pages/Home/Music'


Vue.use(VueRouter)


export default new VueRouter({
    //在实例化路由器对象的配置中,书写路由表配置
    routes: [
        {
            path: '/Home',
            component: Home,
            children: [
                { path: 'News', component: News ,name:'News'},
                { path: 'Music', component: Music,name:'Music' },
            ]
        },
        { path: '/Login', component: Login },


    ]
})